package com.swak.reactivex.cluster;

import com.swak.exception.RemotingException;
import com.swak.registry.URL;
import com.swak.spi.SPI;
import com.swak.spi.ScopeType;

/**
 * 网络
 * 
 * @author 618lf
 */
@SPI(value = "Multicast", scopeType = ScopeType.PROTOTYPE)
public interface Networker {

	void join(URL url);

	void leave(URL url);

	void close();

	void listen(NetworkerListener listener);

	interface NetworkerListener {

		void join(URL url) throws RemotingException;

		void leave(URL url) throws RemotingException;
	}
}
